package com.ruyuan.eshop.common.dao.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruyuan.eshop.common.dao.TransactionRecordDAO;
import com.ruyuan.eshop.common.domain.entity.TransactionRecordDO;
import com.ruyuan.eshop.common.domain.vo.SalesVO;
import com.ruyuan.eshop.common.mapper.TransactionRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * 交易记录mapper
 * @author pwd
 * @version 1.0
 */
@Repository
public class TransactionRecordDAOImpl extends ServiceImpl<TransactionRecordMapper, TransactionRecordDO> implements TransactionRecordDAO {

    @Autowired
    private TransactionRecordMapper transactionRecordMapper;

    /**
     * 商品销售记录分页查询
     * @param page 分页数据
     * @param queryWrapper 查询条件包装器
     * @return
     */
    @Override
    public IPage<SalesVO> selectSalesVoPage(Page page, Wrapper<TransactionRecordDO> queryWrapper) {
        return transactionRecordMapper.selectSalesVoPage(page, queryWrapper);
    }
}
